/* Copyright 2009
 *
 * This program and the accompanying materials
 * are made available under the terms of the
 * Eclipse Public License v1.0 which accompanies
 * this distribution, and is available at
 *
 * 		http://www.eclipse.org/legal/epl-v10.html
 *
 * Unless required by applicable law or agreed to in
 * writing, software distributed under the License is
 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
 * OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing
 * permissions and limitations under the License.
 *
 * Contributors:
 * 	   IBM Corporation - initial API and implementation for JDT/DLTK
 *     Sean W. Quinn - initial adoption for use with PHP from various sources.
 */
package org.eclipse.php.internal.ui.preferences.formatter.dialog;

import org.eclipse.dltk.ui.formatter.FormatterModifyDialog;
import org.eclipse.dltk.ui.formatter.IFormatterModifyDialogOwner;
import org.eclipse.dltk.ui.formatter.IScriptFormatterFactory;
import org.eclipse.php.internal.ui.preferences.formatter.PHPFormatterMessages;
import org.eclipse.php.internal.ui.preferences.formatter.tab.PHPCodeFormatterBlankLinesTabPage;
import org.eclipse.php.internal.ui.preferences.formatter.tab.PHPCodeFormatterBracesTabPage;
import org.eclipse.php.internal.ui.preferences.formatter.tab.PHPCodeFormatterCommentsTabPage;
import org.eclipse.php.internal.ui.preferences.formatter.tab.PHPCodeFormatterControlStatementsTabPage;
import org.eclipse.php.internal.ui.preferences.formatter.tab.PHPCodeFormatterIndentationTabPage;
import org.eclipse.php.internal.ui.preferences.formatter.tab.PHPCodeFormatterLineWrappingTabPage;
import org.eclipse.php.internal.ui.preferences.formatter.tab.PHPCodeFormatterNewLinesTabPage;
import org.eclipse.php.internal.ui.preferences.formatter.tab.PHPCodeFormatterWhiteSpaceTabPage;

/**
 * @author Sean W. Quinn (swquinn@gmail.com)
 */
public class PHPFormatterModifyDialog extends FormatterModifyDialog {

  /**
   * @param dialogOwner
   * @param formatterFactory
   */
  public PHPFormatterModifyDialog(final IFormatterModifyDialogOwner dialogOwner,
      final IScriptFormatterFactory formatterFactory) {
    super(dialogOwner, formatterFactory);
  }

  /**
   * {@inheritDoc}
   *
   * @see org.eclipse.dltk.ui.formatter.FormatterModifyDialog#addPages()
   */
  @Override
  protected void addPages() {
    addTabPage(PHPFormatterMessages.PHPFormatterModifyDialog_tabpage_indentation_title,
        new PHPCodeFormatterIndentationTabPage(this));
    addTabPage(PHPFormatterMessages.PHPFormatterModifyDialog_tabpage_braces_title,
        new PHPCodeFormatterBracesTabPage(this));
    addTabPage(PHPFormatterMessages.PHPFormatterModifyDialog_tabpage_whitespace_title,
        new PHPCodeFormatterWhiteSpaceTabPage(this));
    addTabPage(PHPFormatterMessages.PHPFormatterModifyDialog_tabpage_blank_lines_title,
        new PHPCodeFormatterBlankLinesTabPage(this));
    addTabPage(PHPFormatterMessages.PHPFormatterModifyDialog_tabpage_new_lines_title,
        new PHPCodeFormatterNewLinesTabPage(this));
    addTabPage(PHPFormatterMessages.PHPFormatterModifyDialog_tabpage_line_wrapping_title,
        new PHPCodeFormatterLineWrappingTabPage(this));
    addTabPage(PHPFormatterMessages.PHPFormatterModifyDialog_tabpage_control_statements_title,
        new PHPCodeFormatterControlStatementsTabPage(this));
    addTabPage(PHPFormatterMessages.PHPFormatterModifyDialog_tabpage_comments_title,
        new PHPCodeFormatterCommentsTabPage(this));
  }

}
